home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_08_05 / 8n05065a < prev    next >
Text File  |  1990-04-17  |  224b  |  17 lines

  1. Listing 4
  2.  
  3. mvc(a,x,y,n,m,coln) int n,coln,m;
  4. float x[],y[],a[];
  5. /* y=ax  matrix a(m,n) vector x */
  6. {
  7. int i,j,k;
  8. float sum;
  9. DOFOR(i,m)
  10.     {
  11.     sum=0.;
  12.     DOFOR(j,n) sum+= x[j]*a INDEX(i,j);
  13.     y[i]=sum;
  14.     }
  15. return;
  16. }
  17.